package com.imstlife.vending.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;

/**
 * Created by lihaifeng on 16/10/28.
 */
public class GlideUtil {

    public static void dontAnimLoad(Context context, String url, ImageView iv) {
        Glide.with(context).load(url).dontAnimate().diskCacheStrategy(DiskCacheStrategy.ALL).into(iv);

    }

    public static void loadSmall(Context context, String url, ImageView iv,int value) {
        Glide.with(context).load(url).dontAnimate().centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).override(200,100).into(iv);

    }

    public static void loadImg(Context context,String url){

        Glide.with(context).load(url).diskCacheStrategy(DiskCacheStrategy.ALL) ;
    }
}
